from functools import reduce


def f(x,y):
	return x + y;

num1 = reduce(f,[1,2,3,4,5,6,7])
print(num1)
#输出：
#28

num2 = reduce(f,[1,2,3,4,5,6,7],100)
print(num2)
#输出：
#128
